package com.freecloud.framework.exceptions;

import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.util.StrUtil;

/**
 * 自定义的系统异常，用于抛出自己设定的异常信息
 */
public class CustomSystemException extends RuntimeException{

    public CustomSystemException(Throwable e){
        super(ExceptionUtil.getMessage(e), e);
    }

    public CustomSystemException(String message) {
        super(message);
    }

    public CustomSystemException(String messageTemplate, Object... params) {
        super(StrUtil.format(messageTemplate, params));
    }

    public CustomSystemException(String message, Throwable throwable) {
        super(message, throwable);
    }
}
